cmake_minimum_required (VERSION 2.6) 

project ("OpenMceIrService")

set ( MAJOR_VERSION 0 )
set ( MINOR_VERSION 4 )
set ( MICRO_VERSION 0 )

CONFIGURE_FILE(OpenMceIrService.rc.in OpenMceIrService.rc)
CONFIGURE_FILE(setup.iss.in setup.iss)

set (SOURCES
	OpenMceIrService.rc
	BaseIrDecoder.cpp
	DriverManager.cpp
	IrDecoderManager.cpp
	IrDeviceList.cpp
	MceIrDrv.cpp
	main.cpp
	NecDecoder.cpp
	ODSLogger.cpp
	RC5Decoder.cpp
	RC6Decoder.cpp
	REC80Decoder.cpp
	SonyDecoder.cpp
	Killer.cpp
	MceIrService.cpp
	MceIrSession.cpp
	MceTimings.cpp
	Parsers.cpp
	Publisher.cpp
	TcpSession.cpp
	TService.cpp
)



include_directories(
	"$ENV{BOOST_ROOT}"
)

LINK_DIRECTORIES( ${LINK_DIRECTORIES} $ENV{BOOST_ROOT}/lib )

add_definitions (
	-D_WIN32_WINNT=0x501
    -DNAMEANDVERSION="OpenMceIrService ${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}"
)	

add_executable("OpenMceIrServiceX86" ${SOURCES})
add_executable("OpenMceIrServiceX64" ${SOURCES})

set_target_properties("OpenMceIrServiceX64" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -DBUILD_FOR_WIN64")

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
include(UseDoxygen)
